package cn.com.zpark.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @PackageName: cn.com.zpark.servlet
 * @ClassName: ServletDemo03
 * @Description:
 * @author: RZS
 * @date: 2021/11/9  17:31
 */
public class ServletDemo03 extends HttpServlet {
    // 运行期执行的方法，执行多次
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("ServletDemo03的service方法执行了..........");
    }

    // 销毁阶段执行的方法，只执行一次
    @Override
    public void destroy() {
        System.out.println("ServletDemo03被销毁了...........");
    }


    // 初始化阶段执行的方法，只执行一次
    @Override
    public void init() throws ServletException {
        System.out.println("ServletDemo03被初始化加载..........");
    }
}
